<template>
  <div>
    <div class="header">
        <div class="header-left">
          <div class='iconfont back-icon'>&#xe624;</div>
        </div>
        <div class="header-input">
           <span class='iconfont'>&#xe632;</span>
           输入城市/景点
          </div>
          <router-link to='/city'>
            <div class="header-right">
              {{this.city}}
              <span class='iconfont arrow-icon'>&#xe6aa;</span>
            </div>
          </router-link>
    </div>
  </div>
</template>

<script>
import { mapState, mapGetters } from 'vuex'
export default {
  name: 'HomeHeader',
  computed: {
    ...mapState(['city']),
    ...mapGetters(['doubleCity'])
  }
}
</script>

<style lang="stylus" scoped>
@import '~@/assets/styles/varibles.styl'
  .header
    display: flex
    line-height: $headerHeight
    background: $bgColor 
    color: #fff
    .header-left
      margin-top: .74rem
      width: 1.4rem
      float: left
      .back-icon
        text-align: center
        font-size: 1.2rem
    .header-input
      flex: 1
      height: 1.4rem
      line-height: 1.4rem
      margin-top: .44rem
      margin-left: .2rem
      padding-left: .2rem
      background: #fff
      border-radius: .1rem
      color: #ccc
    .header-right
      margin-top: .44rem
      min-width: 2.5rem
      padding : 0 .1rem
      float: right
      text-align: center
      color: #fff
      .arrow-icon
        margin-left
        font-size: .24rem
</style>
